using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;

namespace SchEdu.Framework.DataModel
{
    public class WorkCenterList : List<SchEduDataSet.WorkCenterRow>
    {
        public WorkCenterList()
        {
        }

        public WorkCenterList(SchEduDataSet.WorkCenterRow[] workCenters)
            : base(workCenters)
        {
        }
   

        public WorkCenterList(SchEduDataSet.WorkCenterDataTable workCenterTable)
        {
            foreach (SchEduDataSet.WorkCenterRow workCenter in workCenterTable)
            {
                Add(workCenter);
            }
        }

        public SchEduDataSet.WorkCenterRow FindByID(int workCenterID)
        {
            foreach (SchEduDataSet.WorkCenterRow workCenter in this)
            {
                if (workCenter.ID == workCenterID)
                {
                    return workCenter;
                }
            }
            return null;
        }
    }
}
